package com.example.mapper;

import com.example.domain.po.Hospital;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface HospitalMapper {
    Hospital findByDockerId(Integer dockerId);


    List<Hospital> list(String name);

    @Insert("insert into hospital(name)  values (#{name})")
    void add(Hospital hospital);

    @Update("update hospital set  name=#{name} where id=#{id}")
    void update(Hospital hospital);

    @Delete("delete from hospital where id=#{id};")
    void del(Integer id);

    @Select("select * from hospital")
    List<Hospital> findAll();

}
